package priv.abadstring.study.haoke.webapi;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * WebApiApplication
 *
 * @author aBadString
 * @date 2021-06-15 15:50:24
 */
@SpringBootApplication
public class WebApiApplication {
    public static void main(String[] args) {
        // 引入 spring-boot-starter-data-elasticsearch 后启动发生异常
        //     Caused by: java.lang.IllegalStateException: availableProcessors is already set to [4], rejecting [4]
        // 原因: Elasticsearch 和 Redis 之间的 Netty 冲突. 需要禁用一个.
        System.setProperty("es.set.netty.runtime.available.processors","false");

        SpringApplication.run(WebApiApplication.class, args);
    }
}
